package com.emip.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "T_MENU_DEF")
public class MenuDefBean implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="ID")
	@GeneratedValue(generator = "userGenerator")     
	@GenericGenerator(name = "userGenerator", strategy = "assigned") 
	private String id;
	
	@Column(name="name")
	private String name;
	
	@Column(name="mlevel")
	private String mlevel;
	
	@Column(name="url")
	private String url;
	
	@Column(name="parentID")
	private String parentID;
	
	@Column(name="showUrl")
	private String showUrl;
	
	@Column(name="status")
	private String status;
	
	@Column(name="morder")
	private Integer morder;
	
	@Transient
	private List<MenuDefBean> children = new ArrayList();	
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMlevel() {
		return mlevel;
	}

	public void setMlevel(String mlevel) {
		this.mlevel = mlevel;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getParentID() {
		return parentID;
	}

	public void setParentID(String parentID) {
		this.parentID = parentID;
	}

	public String getShowUrl() {
		return showUrl;
	}

	public void setShowUrl(String showUrl) {
		this.showUrl = showUrl;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Integer getMorder() {
		return morder;
	}

	public void setMorder(Integer morder) {
		this.morder = morder;
	}

	public List<MenuDefBean> getChildren() {
		return children;
	}

	public void setChildren(List<MenuDefBean> children) {
		this.children = children;
	}		

	
}
